package Serveur;

import java.io.Serializable;

public class Utilisateur implements Serializable{
	private static final long serialVersionUID = 1L;
	protected String prenom;
	protected String nom;
	protected String login;
	protected String pwd;
	protected boolean isConnect;
	
	public Utilisateur(){
		this.prenom = "Inconnu";
		this.nom = "Inconnu";
		this.login = "Inconnu";
		this.pwd = "Inconnu";
		isConnect = false;
	}
	
	public Utilisateur(String prenom, String nom, String login, String mdp){
		this.prenom = prenom;
		this.nom = nom;
		this.login = login;
		this.pwd = mdp;
		isConnect = false;
	}
	
	public void setLoginPwd(String login, String pwd){
		this.login = login;
		this.pwd = pwd;
	}
	
	public String getLogin() {
		return this.login;
	}
	
	public Boolean checkConnect(String login, String pwd){
		return this.login.equals(login) && this.pwd.equals(pwd);
	}
	
	public String toString(){
		return "Prenom : " + prenom + " Nom : " + nom + " Pseudo : " + login + " Password : " + pwd;
	}
	
	public boolean isConnect() {
		return isConnect;
	}
	
	public void setIsConnect(boolean isConnect){
		this.isConnect = isConnect;
	}

}
